﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Policlinica
{
    public class Address : BusinessObjectBase
    {
        private string _postIndex;
        private string _country;
        private string _city;
        private string _street;
        private string _house;
        private string _flat;

        public Address()
        {
          
        }

        public Address(int id, string postIndex, string country, string city, string street, string house,
            string flat, bool isDeleted):base(id, isDeleted)
        {
            _postIndex = postIndex;
            _country = country;
            _city = city;
            _street = street;
            _house = house;
            _flat = flat;
        }

        public Address(string postIndex, string country, string city, string street, string house, string flat)
        {
            _postIndex = postIndex;
            _country = country;
            _city = city;
            _street = street;
            _house = house;
            _flat = flat;
        }

        public string PostIndex
        {
            get
            {
                return this._postIndex;
            }
            set
            {
                if ((this._postIndex != value))
                {
                    this._postIndex = value;
                }
            }
        }

        public string Country
        {
            get
            {
                return this._country;
            }
            set
            {
                if ((this._country != value))
                {
                    this._country = value;
                }
            }
        }

        public string City
        {
            get
            {
                return this._city;
            }
            set
            {
                if ((this._city != value))
                {
                    this._city = value;
                }
            }
        }

        public string Street
        {
            get
            {
                return this._street;
            }
            set
            {
                if ((this._street != value))
                {
                    this._street = value;
                }
            }
        }

        public string House
        {
            get
            {
                return this._house;
            }
            set
            {
                if ((this._house != value))
                {
                    this._house = value;
                }
            }
        }

        public string Flat
        {
            get
            {
                return this._flat;
            }
            set
            {
                if ((this._flat != value))
                {
                    this._flat = value;
                }
            }
        }

        public override string ToString()
        {
            return City + ", " + Street + " " + House + "-" + Flat;
        }
    
    }
}
